<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> 
<html>
	<head>
	<%response.setHeader("Pragma","No-cache"); 
	response.setHeader("Cache-Control","no-cache"); 
	response.setDateHeader("Expires", 0); 
	response.flushBuffer();%>
		<title>参数配置</title>
		<link rel="stylesheet" type="text/css" href="btn_class.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/style.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/desktop.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/ext-patch.css" />

		<script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="ext-2.2/ext-all.js"></script>
		<script type="text/javascript" src="ext-2.2/gridToExcel.js"></script>

		<!--  	<script type="text/javascript" src="ext-2.2/source/locale/ext-lang-zh_CN.js"></script>   -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

		<script type="text/javascript">
		<%String uId = (String) session.getAttribute("Uid");
			if (uId == null || uId.equals("null")) {%>
			window.parent.location.href = 'index.jsp';
		<%}%>
		
		window.onload = function(){
			if("<%=request.getAttribute("paraFlag")%>"=="SUCCESS")
			{
				alert("修改参数成功！");
			}
		}
		  

			function save()
			{
				var exchange_rate = document.getElementById("exchange_rate").value;
				var unit_price = document.getElementById("unit_price").value;
				var first_price = document.getElementById("first_price").value;
				var integral_ratio = document.getElementById("integral_ratio").value;
				if(exchange_rate =="" && unit_price == "" && first_price=="" && integral_ratio=="")
				{
					alert("对不起,请设置相关参数！");
					return;
				}
				var f = document.forms["configForm"];
				f.action = "paraConfig!modify.do";
				f.submit();
			}
			
	</script>
	</head>

	
<body style="background:white"> 
	<div class="x-panel-header x-panel-header-noborder x-unselectable" id="ext-gen8" style="mozuserselect: none; khtmluserselect: none;" unselectable="on">
		<span class="x-panel-header-text" >参数配置</span>
	</div>
		<form name="configForm" method="post">
		 <table width="700px" border="0" cellSpacing="3" cellPadding="3">
		 	<tr>
		 		<td align="right" width="100"><font style="font-size:15px">首重单价：</font></td>
		 		<td align="left" width="200"><input name="first_price" id="first_price" size="15" maxLength="22"/>美元</td>
		 		<td align="left" width="300"><font style="font-size:20px">目前首重单价：</font><c:out value="${pcTO.first_price}"/></td>
		 	</tr>
		 	<tr>
		 		<td align="right" width="100"><font style="font-size:15px">续重单价：</font></td>
		 		<td align="left" width="200"><input name="unit_price" id="unit_price" size="15" maxLength="22"/>美元</td>
		 		<td align="left" width="300"><font style="font-size:20px">目前续重单价：</font><c:out value="${pcTO.unit_price}"/></td>
		 	</tr>
		 	<tr>
		 		<td align="right"  width="100"><font style="font-size:15px">汇率：</font></td>
		 		<td align="left"><input name="exchange_rate" id="exchange_rate" size="15" maxLength="22"/>(中美)</td>
		 		<td align="left"><font style="font-size:20px">目前汇率：</font><c:out value="${pcTO.exchange_rate}"/></td>
		 	</tr>
		 	<tr>
		 		<td align="right"  width="100"><font style="font-size:15px">积分抵扣比例：</font></td>
		 		<td align="left"><input name="integral_ratio" id="integral_ratio" size="15" maxLength="22"/>%</td>
		 		<td align="left"><font style="font-size:20px">目前抵扣比例：</font><c:out value="${pcTO.integral_ratio}"/></td>
		 	</tr>
		 	<tr>
		 		<td>&nbsp;</td>
		 		<td align="center">
		 			<input  type="button" class="submit_btn"  onclick="save();" value="保存" />
		 		</td>
		 		<td>&nbsp;</td>
		 	</tr>
		 	
		 </table>
		  
           </form>
		
    </body> 
</html>
